package cn.by.wms.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import cn.by.wms.entity.*;
import cn.by.wms.service.ProductPriceService;

import java.util.List;

/**
 * 商品价格;(206_product_price)控制层
 * @author : heimi
 * @date : 2024-11-30
 */
@RestController
@RequestMapping("/api/productPrice")
public class ProductPriceController{
    @Autowired
    private ProductPriceService productPriceService;
    
    /** 
     * 查询接口
     */
     @GetMapping
     public List<ProductPrice> select(ProductPriceQuery query){
        return productPriceService.select(query);
    }
    
    @PostMapping 
    public Integer insert(@RequestBody ProductPrice product){
       return productPriceService.insert(product);
    }
    
    @PutMapping 
    public Integer update(@RequestBody ProductPrice product){
        return productPriceService.update(product);
    }
    
    @DeleteMapping
    public Integer delete(Integer id){
        return productPriceService.delete(id);
    }
}